import Vue from 'vue';
import moment from 'moment';
import website from '@/config/website';
import { structuralSplit } from '@/util/util';
//数据处理插件,按需引入
import {
  cloneDeep,
  get,
  find,
  findIndex,
  indexOf,
  omit,
  pick,
  unionBy,
  map,
  orderBy,
  filter,
  trim,
  includes,
  isArray,
  compact,
  forEach,
  union,
  assign,
  uniq,
  throttle,
  debounce,
  differenceBy,
  unionWith,
  remove,
  differenceWith,
  isEqual,
  uniqWith,
  intersectionWith,
  some,
  difference,
  groupBy
} from 'lodash-es';

Vue.prototype._cloneDeep = cloneDeep;
Vue.prototype._get = get;
Vue.prototype._find = find;
Vue.prototype._findIndex = findIndex;
Vue.prototype._indexOf = indexOf;
Vue.prototype._pick = pick;
Vue.prototype._omit = omit;
Vue.prototype._unionBy = unionBy;
Vue.prototype._map = map;
Vue.prototype._orderBy = orderBy;
Vue.prototype._filter = filter;
Vue.prototype._trim = trim;
Vue.prototype._includes = includes;
Vue.prototype._isArray = isArray;
Vue.prototype._forEach = forEach;
Vue.prototype._union = union;
Vue.prototype._assgin = assign;
Vue.prototype._uniq = uniq;
Vue.prototype._throttle = throttle;
Vue.prototype._debounce = debounce;
Vue.prototype._compact = compact;
Vue.prototype._differenceBy = differenceBy;
Vue.prototype._unionWith = unionWith;
Vue.prototype._uniqWith = uniqWith;
Vue.prototype._remove = remove;
Vue.prototype._differenceWith = differenceWith;
Vue.prototype._isEqual = isEqual;
Vue.prototype._intersectionWith = intersectionWith;
Vue.prototype._some = some;
Vue.prototype._difference = difference;
Vue.prototype._groupBy = groupBy;
Vue.prototype.$moment = moment;
Vue.prototype.website = website; // 加载website
Vue.prototype.$structuralSplit = structuralSplit; // ui改造方法
